import { applyMiddleware, createStore } from 'redux'
import { composeWithDevTools } from 'redux-devtools-extension'
import reducer from '@/store/reducers/index'
import thunk from 'redux-thunk'
import { getTokenInfo } from '@/utils/storage'
const store = createStore(
  reducer, // 参数二：初始化时要加载的状态
  {
    login: getTokenInfo(),
  },
  composeWithDevTools(applyMiddleware(thunk))
)
export default store
